
<div id="content">
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
        <?php echo $this->session->flashdata('error'); ?>
    </div>
    <?php endif; ?>
        <div id="title_content">Modifier Actualité</div>
    <?php echo form_open_multipart('admin_news/modifier_actualite/'.$id); ?>
        <table class="form_content" width="100%">
        <tr>
            <td>Type</td>
            <td>
                <?php if (form_error('type') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('type'), '<p>', '</p>'); ?></div> <?php } ?>
              
               <?php 
               $dd_type = array("actualite" => "Actualite", "communique" => "Communique");	 
               echo form_dropdown("type", $dd_type, set_value("type", $type)); ?>
                </td>
        </tr>
      	<tr>
            <td><?php echo lang('title'); ?></td>
            <td>
                <?php if (form_error('title') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('title'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="title" size="35" maxlength="80" value="<?php echo set_value('title', $title); ?>" /></td>
        </tr>
        <tr>
            <td><?php echo lang('description'); ?></td>
            <td>
                <?php if (form_error('description') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('description'), '<p>', '</p>'); ?></div> <?php } ?>
                <textarea name="description" rows=5 cols=66><?php echo set_value("description", $description);?> </textarea></td>
        </tr>
		<tr>
			<td></td>
			<td> <img src="<?php echo $image; ?>" alt="" width="180" height="150"/> </td>
		</tr>      
        <tr>
                 <td>Image <span style="color:red"></span></td>
           <td> 
           <?php if (isset($upload_error) && ($upload_error) != null){?> <div class="form_error"><?php echo generate_pure_text($upload_error, '<p>', '</p>'); ?></div> <?php } ?>
           <input type="file"  name="userfile" size="40" />
           </td>
       </tr>
        <tr>
            <td>Content</td>
            <td>
                <?php if (form_error('content') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('content'), '<p>', '</p>'); ?></div> <?php } ?>
                <?php 
                $data=array(
                    'name'=>'content',
                    'id'=>'content',
                    'height'=>450,
                    'width'=>650,
                    'value' => html_entity_decode(set_value('content', $content)),
                    'type' =>'text'
                    );
                    echo form_fckeditor($data);
                ?>
               
               </td>
        </tr>
        <tr>
            <td><?php echo lang('company'); ?></td>
            <td>
                <?php if (form_error('company') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('company'), '<p>', '</p>'); ?></div> <?php } ?>
                <?php echo form_dropdown("company", $dd_companies, set_value("company", $company)); ?>
                </td>
        </tr>
        
         <tr>
            <td><?php echo lang('active'); ?></td>
            <td>
                <?php if (form_error('active') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('active'), '<p>', '</p>'); ?></div> <?php } ?>
                <?php 
                $dd_active = array("0" => "In-active", "1" => "Active");
                echo form_dropdown("active", $dd_active, set_value("active", $active)); ?>
                </td>
        </tr>
        
              
        <tr>
            <td colspan="2"><input type="submit" name="submit" value="<?php echo lang('edit_profile')?>" class="form_submit" /></td>
        </tr>
    </table>
    <?php echo form_close(); ?>
</div>